![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@types/geojson
Advanced tools
TypeScript definitions for geojson
The @types/geojson package provides TypeScript type definitions for the GeoJSON format. It allows developers to use GeoJSON objects in TypeScript projects with type checking, enabling them to work with geographical data structures according to the GeoJSON specification. This package does not include functionality to manipulate GeoJSON data but rather ensures type safety and autocompletion when working with GeoJSON in TypeScript.
Defining GeoJSON Objects
This code sample demonstrates how to define a GeoJSON object representing a feature collection with TypeScript. The @types/geojson package ensures that the object structure adheres to the GeoJSON specification.
{"type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}
Type Checking GeoJSON Objects
This code sample shows how to use the @types/geojson package for type checking a GeoJSON object. It ensures that the object conforms to the GeoJSON specification for a FeatureCollection containing Point features.
import { FeatureCollection, Point } from 'geojson';
const myGeoJsonObject: FeatureCollection<Point> = {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [102.0, 0.5]
},
properties: {}
}
]
};
Terraformer is a geographic toolkit for dealing with geometry, geography, formats, and building geo databases. It goes beyond just type definitions to offer manipulation and conversion functionalities for GeoJSON data. Unlike @types/geojson, Terraformer provides tools for working with the data, not just type definitions.
Turf is a modular geospatial engine written in JavaScript. It includes various functions to analyze, aggregate, and manipulate GeoJSON data. While @types/geojson provides type definitions for TypeScript projects, Turf offers a wide range of functionalities for spatial analysis and manipulation of GeoJSON objects.
npm install --save @types/geojson
This package contains type definitions for geojson (https://geojson.org/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geojson.
These definitions were written by Jacob Bruun, Arne Schubert, Jeff Jacobson, Ilia Choly, and Dan Vanderkam.
FAQs
TypeScript definitions for geojson
The npm package @types/geojson receives a total of 0 weekly downloads. As such, @types/geojson popularity was classified as not popular.
We found that @types/geojson demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.